<style>
.auction_user {
  border: 1px solid #999999;
  border-collapse: collapse;
  color:#000000;	
}
.auction_user .title td {
    background: none repeat scroll 0 0 #CCCCCC;
    border: 1px solid #999999;
    font-weight: bold;
    padding: 3px;
    text-align: center;
	color:#000000;	
}
</style>
<form action="" name="frm" method="post">
<div class="box_right"><strong>ĐẶT MUA</strong></div><br />
<table width="100%" border="0" class="auction_user">
			<tbody><tr class="title">
	            <td width="10px">Xóa</td>
				<td>STT</td>
				<td>Tên hàng</td>
				<td>Số lượng</td>
                <td>Đơn giá</td>
				<td>Thành tiền</td>
				
			</tr>
			<?
			$tongsotien = 0;
			$sotien = 0;
			$i=0;
			foreach( $products as $product)
			{$i++;
			$value = array_search($product->{PRODUCTS_PRODUCT_ID},$shopping_cart); 
			$sl = $so_luong[$value];
			$sotien = ($product->{PRODUCTS_PROMOTION_PRICE}>0?$product->{PRODUCTS_PROMOTION_PRICE}:$product->{PRODUCTS_PRICE})*$sl;
			$tongsotien = $tongsotien + ($sotien);
			?>
			<tr>
                	<td align="center"> 
					<a style="cursor:pointer" onclick="go_detail('<?=site_url('Chon-Mua')?>/XOA/<?=$product->{PRODUCTS_PRODUCT_ID}?>')" title="Xóa mặt hàng này ra khỏi giỏ hàng"><img src="<?=base_url()?>application/assets/images/cancel.png"></a>
					</td>
					<td align="center"><?=$i?></td>
					<td><?=h($product->{PRODUCTS_NAME})?></td>
					<td align="center">
						<input type="text" value="<?=$sl?>" name="cart_quantity[]" size="5" style=" border:1px solid #999999; text-align:center" maxlength="3">
						 <input type="hidden" name="products_id[]" value="<?php echo $product->{PRODUCTS_PRODUCT_ID};?>"></td>
					 </td>
                     <td align="center"><?=n3($product->{PRODUCTS_PROMOTION_PRICE}>0?$product->{PRODUCTS_PROMOTION_PRICE}:$product->{PRODUCTS_PRICE})?></td>
					<td align="right"><?=n3($sotien)?></td>
					
				</tr>
			<tr>
			<? }?>
    	<td align="right" colspan="5"><strong>Tổng cộng</strong>:</td>
		<td align="right"><?=n3($tongsotien)?></td>
	
	</tr>

</tbody></table>
<br />
<div style="float:right;">
<input class="btn_tieptucmuahang" type="button" onclick="go_detail('<?=site_url('Trang-Chu')?>')" value="Tiếp tục mua hàng" name="dathang">&nbsp;&nbsp;
<input style="margin:5px 5px;" type="submit" value="Cập nhật" name="update" class="btn_chitiet">&nbsp;&nbsp;
<input type="button" onclick="go_detail('<?=site_url('Bang-Gia')?>')" value="Báo Giá" name="dathang" class="btn_chitiet">&nbsp;
</div>
</from>